﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using DevExpress.XtraEditors.Controls;
using DevExpress.Utils;
using Stimulsoft.Report;
using Stimulsoft.Report.Dictionary;
using DevExpress.XtraPrinting;

namespace Gemciler_Uretim.CekListesi
{
    public partial class CekiBarkodGiris : DevExpress.XtraEditors.XtraForm
    {
        public CekiBarkodGiris()
        {
            InitializeComponent();
        }
        SqlConnecitonClass sqlbaglanti = new SqlConnecitonClass();

        public string sip_bolum_no, sqlconnectstr, ekran_acma_sekli, musteri_kodu,stok_kodu;
         int satir_no,secilen_satirRECno;
            public Int32 siparis_RECno;
            public int aktif_kullanici,siparis_barkodlu_miktar=1;
            string AppPath = System.Windows.Forms.Application.StartupPath;
        private void CekiListesics_Load(object sender, EventArgs e)
        {
            dateEdit1.EditValue = DateTime.Today;
            _1_dgv_guncelle();
            _2_dgv_guncelle();
            text_hazirlayan.Text=Convert.ToString(sqlbaglanti.CommScalar("SELECT ku_adi FROM TK_KULLANICI_TANIMLARI WHERE ku_kodu=0",CommandType.Text));

            gridView2.Columns["ÜRETİLEN"].FilterMode = DevExpress.XtraGrid.ColumnFilterMode.DisplayText;
            gridView2.ActiveFilterString = "[ÜRETİLEN] ='0' = true";
        }
        private void _1_dgv_guncelle()
        {
            gridControl1.DataSource = null;
            gridView1.Columns.Clear();
            // ---sip_special1='O' VEYA '' ONAY BEKLİYOR 
            gridControl1.DataSource = sqlbaglanti.ShowTable("SELECT * from dbo.tkfn_CekiListesiGoster(" + siparis_RECno + ") ORDER BY KAYITNO ", CommandType.Text);
            this.gridControl1.TabIndex = 0;
            this.gridView1.OptionsBehavior.AllowIncrementalSearch = true;
            this.gridView1.OptionsView.ShowAutoFilterRow = true;
            this.gridView1.OptionsView.ShowGroupPanel = false; // gruplama alanı
            this.gridView1.OptionsBehavior.Editable = false;
            this.gridView1.OptionsBehavior.ReadOnly = false;
            this.gridView1.OptionsView.ShowFooter = true;
            gridView1.OptionsView.ColumnAutoWidth = false;
            this.gridView1.Appearance.HeaderPanel.TextOptions.WordWrap = DevExpress.Utils.WordWrap.Wrap;
            this.gridView1.ColumnPanelRowHeight = 55;

            gridView1.OptionsView.HeaderFilterButtonShowMode = FilterButtonShowMode.Button;
            this.gridView1.Columns["YIL"].Visible = false;
            this.gridView1.Columns["NAKİYECİ"].Visible = false;
            this.gridView1.Columns["NAK_TEL"].Visible = false;
            this.gridView1.Columns["NAK_PLAKA"].Visible = false;
            this.gridView1.Columns["NAKİYECİ"].Visible = false;
            this.gridView1.Columns["SERİ"].Visible = false;
            this.gridView1.Columns["SIRA"].Visible = false;
            this.gridView1.Columns["ADRES"].Visible = false;

            this.gridView1.Columns["SNO"].Visible = false;
            this.gridView1.Columns["SİPRECNO"].Visible = false;
            this.gridView1.Columns["BRÜT"].DisplayFormat.FormatType = FormatType.Numeric;
            this.gridView1.Columns["BRÜT"].DisplayFormat.FormatString = "n2";
            this.gridView1.Columns["BRÜT"].Width = 80;
            gridView1.Columns["PALET"].SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum;
            gridView1.Columns["PALET"].SummaryItem.DisplayFormat = "{0:N2}";
            gridView1.Columns["PALET"].SummaryItem.Tag = 1;
            gridView1.Columns["KAPAK"].SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum;
            gridView1.Columns["KAPAK"].SummaryItem.DisplayFormat = "{0:N0}";
            gridView1.Columns["KAPAK"].SummaryItem.Tag = 1;

            gridView1.Columns["ADET"].SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum;
            gridView1.Columns["ADET"].SummaryItem.DisplayFormat = "{0:N0}";
            gridView1.Columns["ADET"].SummaryItem.Tag = 1;

            gridView1.Columns["NET"].SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum;
            gridView1.Columns["NET"].SummaryItem.DisplayFormat = "{0:N0}";
            gridView1.Columns["NET"].SummaryItem.Tag = 1;

            gridView1.Columns["ÖLÇÜ"].SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Count;
            gridView1.Columns["ÖLÇÜ"].SummaryItem.DisplayFormat = "{0:N0} ADET";
            gridView1.Columns["ÖLÇÜ"].SummaryItem.Tag = 1;

       


            gridView1.BestFitColumns();

           
        }
      
        private void _2_dgv_guncelle()
        {
            gridControl2.DataSource = sqlbaglanti.ShowTable("SELECT * from dbo.tkfn_SiparisListesiMusteriKodlu ('" + musteri_kodu + "',99999999)", CommandType.Text);

            this.gridControl2.TabIndex = 0;
            this.gridView2.OptionsBehavior.AllowIncrementalSearch = true;
            this.gridView2.OptionsView.ShowAutoFilterRow = true;
            this.gridView2.OptionsView.ShowGroupPanel = false; // gruplama alanı
            this.gridView2.OptionsBehavior.Editable = false;
            this.gridView2.OptionsBehavior.ReadOnly = false;
            this.gridView2.OptionsView.ShowFooter = true;
            gridView2.OptionsView.ColumnAutoWidth = false;
            this.gridView2.Appearance.HeaderPanel.TextOptions.WordWrap = DevExpress.Utils.WordWrap.Wrap;
            
            
            int index1 = 0;
            this.Text = "İŞLEM NO   " + gridView2.GetRowCellValue(index1, "KAYITNO").ToString() + "";
            siparis_RECno = Convert.ToInt32(gridView2.GetRowCellValue(index1, "KAYITNO").ToString());

            text_sip_seri.Text = "" + gridView2.GetRowCellValue(index1, "SERİ").ToString() + "";
            text_sip_sira.Text= ""+ gridView2.GetRowCellValue(index1, "SIRA").ToString() + "  ";
            memo_adres.Text = gridView2.GetRowCellValue(index1, "ADRES").ToString() + "";         
            sip_bolum_no = "" + gridView2.GetRowCellValue(index1, "BÖLÜM").ToString() + "";
            text_kalinlik.Text = "" + gridView2.GetRowCellValue(index1, "KALINLIK MM").ToString() + "";       
            text_genislik.Text = "" + gridView2.GetRowCellValue(index1, "GENIŞLİK W MM").ToString() + "";   
            text_boy.Text= "" + gridView2.GetRowCellValue(index1, "BOY MT").ToString() + "";           
            text_ic_cap.Text = "" + gridView2.GetRowCellValue(index1, "İÇ ÇAP MM").ToString() + "";          
            text_dis_cap.Text = "" + gridView2.GetRowCellValue(index1, "DIŞ ÇAP MM").ToString() + "";
            text_musteri_kodu.Text = "" + gridView2.GetRowCellValue(index1, "KODU").ToString() + "";
            text_sertlik.Text = "" + gridView2.GetRowCellValue(index1, "SERTLİK").ToString() + "";
            text_mus_sip.Text = "" + gridView2.GetRowCellValue(index1, "MÜŞTERİ SİPARİŞ NO").ToString() + "";
            text_alisim.Text = "" + gridView2.GetRowCellValue(index1, "ALIŞIM TİPİ").ToString() + "";
            musteri_kodu = "" + gridView2.GetRowCellValue(index1, "KODU").ToString() + "";
            text_mus_adi.Text = "" + gridView2.GetRowCellValue(index1, "MÜŞTERİ").ToString() + "";
            text_musteri_stokkod.Text = "" + gridView2.GetRowCellValue(index1, "MÜŞTERİ MALZEME KODU").ToString() + "";
            stok_kodu = "" + gridView2.GetRowCellValue(index1, "STOK KODU").ToString() + "";
            gridView2.Columns["MİKTAR"].SummaryItem.DisplayFormat = "{0:N2}";
            gridView2.Columns["ÜRETİLEN"].SummaryItem.DisplayFormat = "{0:N2}";

            for (int i = 0; i < gridView2.Columns.Count; i++)
            {
                this.gridView2.Columns[i].Visible = false;
                this.gridView2.Columns[i].OptionsFilter.FilterPopupMode = DevExpress.XtraGrid.Columns.FilterPopupMode.CheckedList;
            }
            this.gridView2.Columns["BÖLÜM"].Visible = true;
            this.gridView2.Columns["BÖLÜM"].VisibleIndex = 1;
         
            this.gridView2.Columns["MİKTAR"].Visible = true;
            this.gridView2.Columns["MİKTAR"].VisibleIndex = 4;

            this.gridView2.Columns["ÜRETİLEN"].Visible = true;
            this.gridView2.Columns["ÜRETİLEN"].VisibleIndex = 9;
            this.gridView2.Columns["ÜRT KALAN"].Visible = true;
            this.gridView2.Columns["ÜRT KALAN"].VisibleIndex = 9;
            this.gridView2.Columns["KALINLIK MM"].Visible = true;
            this.gridView2.Columns["KALINLIK MM"].VisibleIndex = 2;
            this.gridView2.Columns["GENIŞLİK W MM"].Visible = true;
            this.gridView2.Columns["GENIŞLİK W MM"].VisibleIndex = 3;


        }
        private void ceki_liste_kaydet()
        {

            string brut,net,adet,palet,kapak;
            brut=calc_brut.Value.ToString();
            brut=brut.Replace(",",".");
            net=calc_net.Value.ToString();
            net=net.Replace(",",".");
            adet=calc_adet.Value.ToString();
            adet=adet.Replace(",",".");
            palet=calc_palet.Value.ToString();
            palet=palet.Replace(",",".");
            kapak=calc_kapak.Value.ToString();
            kapak=kapak.Replace(",",".");
        
            sqlbaglanti.CommScalar("INSERT INTO [TK_CEKI_LISTESI] "
                + "            ([cek_create_date]"
                + "            ,[cek_create_user]"
                + "            ,[cek_satirno]"
                + "            ,[cek_sip_recno]"               
                + "            ,[cek_musteri_sip_no]"
                + "            ,[cek_olcu]"
                + "            ,[cek_brut]"
                + "            ,[cek_palet]"
                + "            ,[cek_kapak]"
                + "            ,[cek_net]"
                + "            ,[cek_adet]"
                + "            ,[cek_kapat]"
                + "            ,[cek_bolum_no],cek_musteri_kodu,cek_barkodu,cek_musteri_stok_kodu,cek_stok_kodu)"
              

                +" VALUES( "
                + " GETDATE() "             ///            ([cek_create_date]
                + " ," + aktif_kullanici + ""             ///            ,[cek_create_user]
                + ",0"             ///            ,[cek_satirno]
                + " ," + siparis_RECno + ""             ///            ,[cek_sip_recno]
               
                + " ,'" + text_mus_sip.Text + "'"             ///            ,[cek_musteri_sip_no]
                + " ,'" + text_olcu.Text + "'"             ///            ,[cek_olcu]
                + " ," + brut + ""             ///            ,[cek_brut]
                + " ," + palet + ""             ///            ,[cek_palet]
                + " ," + kapak + ""             ///            ,[cek_kapak]
                + " ," + net + ""             ///            ,[cek_net]
                + " ," + adet + ""             ///            ,[cek_adet]
                + " ,0,'" + sip_bolum_no + "','"+musteri_kodu+"',9999,'"+text_musteri_stokkod.Text+"','"+stok_kodu+"'"            ///            ,[cek_kapat],muster kodu
                + " )", CommandType.Text);
            
            sqlbaglanti.CommScalar("UPDATE TK_CEKI_LISTESI SET cek_barkodu=  cast((cast([cek_RECno]  AS VARCHAR (15))+''+cast(year([cek_create_date]) AS VARCHAR (4))) AS INT)     WHERE cek_barkodu=9999",CommandType.Text);

            if (MessageBox.Show("BARKOD YAZILSINMI  ", "Onay Ekranı", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) == DialogResult.OK)
            {
                secilen_satirRECno = Convert.ToInt16(sqlbaglanti.CommScalar("SELECT MAX (cek_RECno) FROM TK_CEKI_LISTESI WHERE cek_musteri_kodu='"+musteri_kodu+"'",CommandType.Text));
                FormuYAZDIR();
            }

            degiskenSifirla();
        }
        private void degiskenSifirla()
        {
            //satir_no = Convert.ToInt32(sqlbaglanti.CommScalar("SELECT isnull( max(cek_satirno),0)+1 from TK_CEKI_LISTESI WHERE cek_sip_recno=" + siparis_RECno + "", CommandType.Text));
            text_sn.Text = "";
            text_olcu.Text = "";
            calc_brut.Value = 0;
            calc_adet.Value = 1;
            calc_kapak.Value = 0;
            calc_palet.Value = 0;
            calc_net.Value = 0;
           
        }
        private void FormuDZYN()
        {

            StiReport report = new StiReport();

            report.Load("" + AppPath + "\\Form\\SEVKBRK.MRT");
            report.Dictionary.Databases.Clear();
            report.Dictionary.Databases.Add(new StiSqlDatabase("RAPORDATA", "" + sqlconnectstr + ""));
            report["@sipRECno"] = siparis_RECno;
            report["@sevksatirRECno"] = secilen_satirRECno;

            report.Design();
            report.Save("" + AppPath + "\\Form\\SEVKBRK.MRT");



        }
        private void FormuEKRANA()
        {

            StiReport report = new StiReport();

            report.Load("" + AppPath + "\\Form\\SEVKBRK.MRT");
            report.Dictionary.Databases.Clear();
            report.Dictionary.Databases.Add(new StiSqlDatabase("RAPORDATA", "" + sqlconnectstr + ""));
            report["@sipRECno"] = siparis_RECno;
            report["@sevksatirRECno"] = secilen_satirRECno;



            report.ShowWithWpf();



        }
        private void FormuYAZDIR()
        {

            StiReport report = new StiReport();

            report.Load("" + AppPath + "\\Form\\SEVKBRK.MRT");
            report.Dictionary.Databases.Clear();
            report.Dictionary.Databases.Add(new StiSqlDatabase("RAPORDATA", "" + sqlconnectstr + ""));
            report["@sipRECno"] = siparis_RECno;
            report["@sevksatirRECno"] = secilen_satirRECno;
            report.Print();

        }

        private void net_hesapla()
        {
            calc_net.Value = calc_brut.Value - (calc_kapak.Value + calc_palet.Value);
        }
       

        private void calc_brut_EditValueChanged(object sender, EventArgs e)
        {
            net_hesapla();
        }

        private void calc_palet_EditValueChanged(object sender, EventArgs e)
        {
            net_hesapla();
        }

        private void calc_kapak_EditValueChanged(object sender, EventArgs e)
        {
            net_hesapla();
        }

        private void simpleButton1_Click(object sender, EventArgs e)
        {
            if (calc_net.Value > 0)
            {
                ceki_liste_kaydet();
                _1_dgv_guncelle();
                degiskenSifirla();
                _2_dgv_guncelle();
                
            }
            else { MessageBox.Show("Miktar Girişi Yapılmalı "); }
        }

       

        private void gridView1_DoubleClick(object sender, EventArgs e)
        {
            try
            {
                int index1 = gridView1.FocusedRowHandle;
                Int32 secim_RECno = Convert.ToInt32(gridView1.GetRowCellValue(index1, "KAYITNO").ToString());
             
                text_olcu.Text = Convert.ToString(gridView1.GetRowCellValue(index1, "ÖLÇÜ").ToString());
                calc_brut.Value = Convert.ToInt32(gridView1.GetRowCellValue(index1, "BRÜT").ToString());
                calc_palet.Value = Convert.ToInt32(gridView1.GetRowCellValue(index1, "PALET").ToString());
                calc_kapak.Value = Convert.ToInt32(gridView1.GetRowCellValue(index1, "KAPAK").ToString());
                calc_adet.Value = Convert.ToInt32(gridView1.GetRowCellValue(index1, "ADET").ToString());
                calc_net.Value = Convert.ToInt32(gridView1.GetRowCellValue(index1, "NET").ToString());
                text_olcu.Focus();
            }
            catch { }
        }

       

        private void combo_telefon_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyData == Keys.Enter)
            { text_olcu.Focus(); }
        }

        private void calc_adet_EditValueChanged(object sender, EventArgs e)
        {
            if (calc_adet.Value == 0)
            { MessageBox.Show("MİKTAR 0 OLAMAZ"); calc_adet.Value = 1; }
        }

        private void satırSilToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
                int index1 = gridView1.FocusedRowHandle;
                Int32 secim_RECno = Convert.ToInt32(gridView1.GetRowCellValue(index1, "KAYITNO").ToString());
                if (MessageBox.Show("" + secim_RECno + "  Nolu kayıt Silinecek Onaylıyormusunuz.  ", "Onay Ekranı", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) == DialogResult.OK)
                {
                    sqlbaglanti.CommScalar("DELETE FROM TK_CEKI_LISTESI WHERE cek_RECno=" + secim_RECno + "", CommandType.Text);
                    _1_dgv_guncelle();
                }


            }
            catch { MessageBox.Show("SECİM YAPILAMADI"); }
        }

        private void barkodTasarımToolStripMenuItem_Click(object sender, EventArgs e)
        {
           
        }

        private void barkodBasımToolStripMenuItem_Click(object sender, EventArgs e)
        {

            int index1 = gridView1.FocusedRowHandle;
            secilen_satirRECno= Convert.ToInt32(gridView1.GetRowCellValue(index1, "KAYITNO").ToString());

            FormuEKRANA();
        }

        private void listeYazdırToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PrintableComponentLink link = new PrintableComponentLink(new PrintingSystem());
            link.Component = gridControl1; //yazdıracağımız grid’i gösteriyoruz.
            link.Landscape = true; //kenarlıkların, boşlukların görüntülenmesini sağlıyoruz.
            link.PageHeaderFooter = true;
            link.RtfReportHeader = "Çeki Listesi";
            link.ShowPreview(); //yazdırılacak gridi ekranda gösteriyoruz
        }

        private void yenileToolStripMenuItem_Click(object sender, EventArgs e)
        {
            _1_dgv_guncelle();
        }

        private void çekiListesiToolStripMenuItem_Click(object sender, EventArgs e)
        {
            StiReport report = new StiReport();

            report.Load("" + AppPath + "\\Form\\CEKILISTESI.MRT");
            report.Dictionary.Databases.Clear();
            report.Dictionary.Databases.Add(new StiSqlDatabase("RAPORDATA", "" + sqlconnectstr + ""));
            report["@sipRECno"] = siparis_RECno;
            report["@sevksatirno"] = secilen_satirRECno;



            report.ShowWithWpf();
        }

        private void barkodTasarımToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            int index1 = gridView1.FocusedRowHandle;
            secilen_satirRECno = Convert.ToInt32(gridView1.GetRowCellValue(index1, "KAYITNO").ToString());

            FormuDZYN();
        }

        private void çekiListesiTasarımToolStripMenuItem_Click(object sender, EventArgs e)
        {
            StiReport report = new StiReport();

            report.Load("" + AppPath + "\\Form\\CEKILISTESI.MRT");
            report.Dictionary.Databases.Clear();
            report.Dictionary.Databases.Add(new StiSqlDatabase("RAPORDATA", "" + sqlconnectstr + ""));
            report["@sipRECno"] = siparis_RECno;
            report["@sevksatirno"] = secilen_satirRECno;



            report.Design();
        }

        private void simpleButton2_Click(object sender, EventArgs e)
        {
           

            //combo_nakiyeci.DataSource = sqlbaglanti.ShowTable("select sof_kodu AS KOD,sof_adi AS ADI FROM TK_CEK_SOFOR_TANIMLARI  ORDER BY sof_adi ", CommandType.Text);
            //combo_nakiyeci.DisplayMember = "ADI";
            //combo_nakiyeci.ValueMember = "KOD";

        }

        private void simpleButton3_Click(object sender, EventArgs e)
        {
            SISTEM.NakFirmaTanitim fr = new SISTEM.NakFirmaTanitim();
            fr.aktif_kullanici = aktif_kullanici;
            fr.ShowDialog();
            //combo_firma.DataSource = sqlbaglanti.ShowTable("select nak_kodu AS KOD,nak_unvani AS ADI FROM TK_NAKLIYE_FIRMA_TANIMLARI ORDER BY nak_unvani ", CommandType.Text);
            //combo_firma.DisplayMember = "ADI";
            //combo_firma.ValueMember = "KOD";

                 
        }

        private void simpleButton4_Click(object sender, EventArgs e)
        {
            text_olcu.Text=text_olcu.Text+" "+text_kalinlik.Text;
            text_olcu.Focus();
            
        }

        private void simpleButton5_Click(object sender, EventArgs e)
        {
            text_olcu.Text = text_olcu.Text + " - " + text_genislik.Text;
            text_olcu.Focus();
        }

        private void simpleButton6_Click(object sender, EventArgs e)
        {
            text_olcu.Text = text_olcu.Text + " - " + text_boy.Text;
            text_olcu.Focus();
        }

        private void simpleButton7_Click(object sender, EventArgs e)
        {
            text_olcu.Text = text_olcu.Text + " - " + text_dis_cap.Text;
            text_olcu.Focus();
        }

        private void simpleButton8_Click(object sender, EventArgs e)
        {
            text_olcu.Text = text_olcu.Text + " - " + text_ic_cap.Text;
            text_olcu.Focus();
        }

        private void simpleButton9_Click(object sender, EventArgs e)
        {
            text_olcu.Text = text_olcu.Text + " - " + text_sertlik.Text;
            text_olcu.Focus();
        }

        private void simpleButton10_Click(object sender, EventArgs e)
        {
            text_olcu.Text = text_olcu.Text + " - " + text_alisim.Text;
            text_olcu.Focus();
        }

        private void gridView2_Click(object sender, EventArgs e)
        {

            try
            {

                int index1 = gridView2.FocusedRowHandle;


                siparis_RECno = Convert.ToInt32(gridView2.GetRowCellValue(index1, "KAYITNO").ToString());

                text_sip_seri.Text = "" + gridView2.GetRowCellValue(index1, "SERİ").ToString() + "";
                text_sip_sira.Text = "" + gridView2.GetRowCellValue(index1, "SIRA").ToString() + "  ";



                memo_adres.Text = gridView2.GetRowCellValue(index1, "ADRES").ToString() + "";

                sip_bolum_no = "" + gridView2.GetRowCellValue(index1, "BÖLÜM").ToString() + "";
                text_kalinlik.Text = "" + gridView2.GetRowCellValue(index1, "KALINLIK MM").ToString() + "";

                text_genislik.Text = "" + gridView2.GetRowCellValue(index1, "GENIŞLİK W MM").ToString() + "";

                text_boy.Text = "" + gridView2.GetRowCellValue(index1, "BOY MT").ToString() + "";

                text_ic_cap.Text = "" + gridView2.GetRowCellValue(index1, "İÇ ÇAP MM").ToString() + "";

                text_dis_cap.Text = "" + gridView2.GetRowCellValue(index1, "DIŞ ÇAP MM").ToString() + "";
                text_musteri_kodu.Text = "" + gridView2.GetRowCellValue(index1, "KODU").ToString() + "";
                text_sertlik.Text = "" + gridView2.GetRowCellValue(index1, "SERTLİK").ToString() + "";
                text_mus_sip.Text = "" + gridView2.GetRowCellValue(index1, "MÜŞTERİ SİPARİŞ NO").ToString() + "";
                text_alisim.Text = "" + gridView2.GetRowCellValue(index1, "ALIŞIM TİPİ").ToString() + "";
                musteri_kodu = "" + gridView2.GetRowCellValue(index1, "KODU").ToString() + "";
                text_mus_adi.Text = "" + gridView2.GetRowCellValue(index1, "MÜŞTERİ").ToString() + "";
                this.Text = "İŞLEM NO   " + text_sip_seri.Text + "-" + text_sip_sira.Text + " / " + sip_bolum_no;
                text_olcu.Text = text_genislik.Text + " - " + text_kalinlik.Text + " - " + text_boy.Text;
                calc_brut.Focus();
                _1_dgv_guncelle();
            }
            catch { }
        }

        private void sadeceBarkodsuzlarıGösterToolStripMenuItem_Click(object sender, EventArgs e)
        {
            gridView2.Columns["ÜRETİLEN"].FilterMode = DevExpress.XtraGrid.ColumnFilterMode.DisplayText;
            gridView2.ActiveFilterString = "[ÜRETİLEN] ='0' = true";
            
        }

        private void hepsiniGösterToolStripMenuItem_Click(object sender, EventArgs e)
        {
            gridView2.Columns["ÜRETİLEN"].FilterMode = DevExpress.XtraGrid.ColumnFilterMode.DisplayText;

            gridView2.ActiveFilterString = "[ÜRETİLEN] >='0' = true";
        }

        private void yenileToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            _2_dgv_guncelle();
        }
    }
}